import request from "@/utils/request.js";

// 根据订单id和类型获取流程实例id
export const getProcessInstanceIdByOrderIdAndType = (data) => {
  return request.get('/bpm/oa-examine/query-by-orderid-and-type', data)
}
// 获取流程实例
export const getProcessInstance = (data) => {
  return request.get('/bpm/process-instance/get', data)
};

// 获取OA 订单业务流程
export const getOAExamine = (data) => {
  return request.get('/bpm/oa-examine/get', data)
};

// 获得指定流程实例的任务列表
export const getProcessInstanceTaskList = (data) => {
  return request.get('/bpm/task/list-by-process-instance-id', data)
};

// 通过审批
export const passApprove = (data) => {
  return request.put('/bpm/task/approve', data)
};

// 拒绝审批
export const rejectApprove = (data) => {
  return request.put('/bpm/task/reject', data)
};

// 转设计延期
export const transformDesignExtension = (data) => {
  return request.post('/system/order/design-extension', data)
};

// 申请废单
export const applyAbandonedOrder = (data) => {
  return request.post('/system/order/apply-delete', data)
};

